// https://umijs.org/docs/max/layout-menu#%E6%89%A9%E5%B1%95%E7%9A%84%E8%B7%AF%E7%94%B1%E9%85%8D%E7%BD%AE
// https://umijs.org/docs/guides/routes
// 路由配置

// import { MENU_LIST } from '../src/utils/constant'

const generateRoutesItem = () => {
  const arr: any[] = []
  //   MENU_LIST.forEach((item) => {
  //     arr.push({ path: item.push, component: 'global/Home' })
  //     item.children.forEach((info) => {
  //       arr.push({ path: info.push, component: info.push.substring(1), access: info.access })
  //     })
  //   })
  return arr
}

// 路由中的重定向写到layout.tsx
// export const routes = [
//   { path: '/login', component: 'global/Login', layout: false },
//   { path: '/', component: 'global/Home' },
//   // 站点详情
//   { path: '/Home/StationDetail/:stationId', component: 'global/StationDetail' },

//   ...generateRoutesItem(),

//   // 404
//   { path: '/*', component: 'global/NoFound', layout: false },
// ]

export const routes = [
  { path: '/', component: 'index' },
  { path: '/docs', component: 'docs' },
  { path: '/videoUpload', component: 'videoUpload' },
  { path: '/three', component: 'threeJsDemo' },
  { path: '/threeLine', component: 'threeJsDemo/line' },
  { path: '/wordCloud', component: 'wordCloud' },
  { path: '/dingLogin', component: 'dingLogin' },
  { path: '/mindMap', component: 'mindMap' },
  // 404
  { path: '/*', component: 'global/NoFound', layout: false },
]
